package com.my.cd.mediator;

/**
 * 主测试类
 */
public class MainTest {

    public static void main(String[] args) {
        Mediator mediator = new SmartHomeMediator();
        Alarm mAlarm = new Alarm("mAlarm", mediator);
        CoffeeMachine mCoffeeMachine = new CoffeeMachine("mCoffeeMachine", mediator);
        Curtains mCurtains = new Curtains("mCurtains", mediator);
        TV mTV = new TV("mTV", mediator);
        mAlarm.sendAlarm(0);
        mCoffeeMachine.finishCoffee();
        mAlarm.sendAlarm(1);
    }

}
